<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="index.html">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">资讯列表</span><span class="crumb-step">&gt;</span><span class="crumb-name">资讯管理<span style="color: red"><span id="count"></span></span></span></div>
</div>
<div class="search-wrap">
    <div class="result-title">
        <div class="result-list">

        </div>
    </div>

    <table class="result-tab" width="100%">
        <tr>
            <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox">排序</th>
            <th>任务名</th>
            <th>发布者</th>
            <th>发布时间</th>
            <th>接收者</th>
            <th>接收时间</th>
            <th>任务内容</th>
            <th>索引图片</th>
            <th>任务进度</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${requestScope.markTask.list}" var="task" varStatus="stat">
            <tr id="tr${task.id}">
                <td class="tc"><input name="id[]" value="59" type="checkbox">${stat.index+1}</td>
                <td data-id="${task.id}" class="new" style="color: #4b7eff">《${task.title}》</td>
                <td>${task.userinfo.username}</td>
                <td><fmt:formatDate value="${task.inputTime}" pattern="yyyy-MM-dd"/></td>

                <td>
                    <c:if test="${task.vuserinfo.username}">
                        <span style="color: red">任务暂无人接收</span>
                    </c:if>
                    <c:if test="${not empty task.vuserinfo.username}">
                        ${task.vuserinfo.username}
                    </c:if>
                </td>
                <td><fmt:formatDate value="${task.acceptTime}" pattern="yyyy-MM-dd"/></td>
                <td>${task.info}</td>
                <td><img id="pic" style="width: 120px" src="<%=path%>/web/userinfo/img/taskImages/${task.pic}"></td>
                <td>${task.mark.title}</td>
                <td>
                    删除
                </td>
            </tr>
        </c:forEach>
    </table>
    <div class="list-page">
        <c:forEach  items="${requestScope.task.navigatepageNums}" var="i">
            <a class="list"  data-id="${i}">${i}</a>
        </c:forEach>
    </div>

    <jsp:include page="/manage/inc/footer"></jsp:include>
    <script>
        $(function () {
            $("#pic").click(function () {
                layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 0,
                    area: 'auto',
                    skin: 'layui-layer-nobg', //没有背景色
                    shadeClose: true,
                    content: $('#pic')
                });
            })
        })
    </script>
